# 破坏检测
execute as @e[type=marker,tag=electric_craft_bench] at @s unless block ~ ~ ~ dropper run kill @s

#物品格子数量报告
execute as @e[type=marker,tag=electric_craft_bench] at @s if data block ~ ~ ~ Items[{Slot:0b}].Count store result score @s ecb_count1 run data get block ~ ~ ~ Items[{Slot:0b}].Count
execute as @e[type=marker,tag=electric_craft_bench] at @s unless data block ~ ~ ~ Items[{Slot:0b}].Count run scoreboard players set @s ecb_count1 0
execute as @e[type=marker,tag=electric_craft_bench] at @s if data block ~ ~ ~ Items[{Slot:1b}].Count store result score @s ecb_count2 run data get block ~ ~ ~ Items[{Slot:1b}].Count
execute as @e[type=marker,tag=electric_craft_bench] at @s unless data block ~ ~ ~ Items[{Slot:1b}].Count run scoreboard players set @s ecb_count2 0
execute as @e[type=marker,tag=electric_craft_bench] at @s if data block ~ ~ ~ Items[{Slot:2b}].Count store result score @s ecb_count3 run data get block ~ ~ ~ Items[{Slot:2b}].Count
execute as @e[type=marker,tag=electric_craft_bench] at @s unless data block ~ ~ ~ Items[{Slot:2b}].Count run scoreboard players set @s ecb_count3 0
execute as @e[type=marker,tag=electric_craft_bench] at @s if data block ~ ~ ~ Items[{Slot:3b}].Count store result score @s ecb_count4 run data get block ~ ~ ~ Items[{Slot:3b}].Count
execute as @e[type=marker,tag=electric_craft_bench] at @s unless data block ~ ~ ~ Items[{Slot:3b}].Count run scoreboard players set @s ecb_count4 0
execute as @e[type=marker,tag=electric_craft_bench] at @s if data block ~ ~ ~ Items[{Slot:4b}].Count store result score @s ecb_count5 run data get block ~ ~ ~ Items[{Slot:4b}].Count
execute as @e[type=marker,tag=electric_craft_bench] at @s unless data block ~ ~ ~ Items[{Slot:4b}].Count run scoreboard players set @s ecb_count5 0
execute as @e[type=marker,tag=electric_craft_bench] at @s if data block ~ ~ ~ Items[{Slot:5b}].Count store result score @s ecb_count6 run data get block ~ ~ ~ Items[{Slot:5b}].Count
execute as @e[type=marker,tag=electric_craft_bench] at @s unless data block ~ ~ ~ Items[{Slot:5b}].Count run scoreboard players set @s ecb_count6 0
execute as @e[type=marker,tag=electric_craft_bench] at @s if data block ~ ~ ~ Items[{Slot:6b}].Count store result score @s ecb_count7 run data get block ~ ~ ~ Items[{Slot:6b}].Count
execute as @e[type=marker,tag=electric_craft_bench] at @s unless data block ~ ~ ~ Items[{Slot:6b}].Count run scoreboard players set @s ecb_count7 0
execute as @e[type=marker,tag=electric_craft_bench] at @s if data block ~ ~ ~ Items[{Slot:7b}].Count store result score @s ecb_count8 run data get block ~ ~ ~ Items[{Slot:7b}].Count
execute as @e[type=marker,tag=electric_craft_bench] at @s unless data block ~ ~ ~ Items[{Slot:7b}].Count run scoreboard players set @s ecb_count8 0
execute as @e[type=marker,tag=electric_craft_bench] at @s if data block ~ ~ ~ Items[{Slot:8b}].Count store result score @s ecb_count9 run data get block ~ ~ ~ Items[{Slot:8b}].Count
execute as @e[type=marker,tag=electric_craft_bench] at @s unless data block ~ ~ ~ Items[{Slot:8b}].Count run scoreboard players set @s ecb_count9 0

#合成
execute as @e[type=marker,tag=electric_craft_bench] at @s if entity @e[type=item_frame,distance=..3,tag=electric_button,tag=hasPower] run function #advm:electric_craft_bench_recipes